package com.lepu.app.fun.chat.bean;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.lepu.app.fun.hospital.bean.HospitalDoctor;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.util.ArrayList;

/**
 * Created by Administrator on 2015/12/10.
 */
public class QuestionEntity {

    public String DataCount;
    public ArrayList<Question> questions; //专家列表

    public static QuestionEntity parseJsonData(String dataString) {
        QuestionEntity questionEntity = new QuestionEntity();
        try {
            JSONObject jsonObject = new JSONObject(dataString);
            JSONObject obj1 = (JSONObject) jsonObject.get("Result");
            questionEntity.DataCount = ((JSONObject) obj1.get("DetailInfo")).optString("DataCount");
        } catch (JSONException e) {
            e.printStackTrace();
        }
        questionEntity.questions = Question.parseJsonData(dataString);
        return questionEntity;
    }
}
